package com.hsgene.order.persistence;

import com.hsgene.order.domain.OrderPackage;
import com.hsgene.product.domain.GeneticTestingProductDetail;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * fx
 */
public interface OrderPackageMapper {
    int deleteByPrimaryKey(String id);

    int insert(OrderPackage record);

    int insertSelective(OrderPackage record);

    OrderPackage selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(OrderPackage record);

    int updateByPrimaryKey(OrderPackage record);

    void updateByPackageIdAndOrder(OrderPackage orderPackage);
/**
 *根据订单id查找所有的packages
 * @author FX
 * @date 2018/11/8 15:22
 * @param id
 * @return
 */
    List<OrderPackage> getPackageByOrderId(String id);
    /**
     *批量结算
     * @author FX
     * @date 2018/11/15 14:03
     * @param collect
     * @return
     */
    void updateByPrimaryKeyMore(@Param("list") List<OrderPackage> list);
    /**
     *根据套餐id，机构id，查找套餐对应的机构信息
     * @author FX
     * @date 2018/11/27 13:47
     * @param orderPackage
     * @return
     */
    GeneticTestingProductDetail getPackageCost(OrderPackage orderPackage);
    /**
     *修改套餐机构表的成本
     * @author FX
     * @date 2018/11/27 14:00
     * @param
     * @return
     */
    void updateProductDetailCost(GeneticTestingProductDetail productDetail);
    /**
     *根据订单id和套餐id查询OrderPackage
     * @author FX
     * @date 2018/12/13 11:16
     * @param orderPackage
     * @return
     */
    OrderPackage selectByPackageIdAndOrder(OrderPackage orderPackage);
}